DIGITAL CLOCK function time() { mytime=new Date() h=mytime.getHours() m=mytime.getMinutes() s=mytime.getSeconds() document.f.h.value=h document.f.h.value=m document.f.h.value=s } window.setInterval("time()", 1000) //create a form named "f" width textboxes named h, m and s